package com.xuecheng.api.content;

import com.xuecheng.api.content.model.dto.TeachplanDTO;
import com.xuecheng.api.content.model.dto.TeachplanMediaDTO;
import com.xuecheng.api.content.model.vo.TeachplanVO;
import com.xuecheng.api.media.vo.BindTeachplanMediaVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

@Api(tags = "课程计划 API 接口")
@Validated
public interface TeachplanApi {

    @ApiOperation("课程计划树形结构查询")
    @ApiImplicitParam(name = "courseId", value = "课程基础信息ID", required = true, dataType = "Long", paramType = "path")
    TeachplanDTO queryTreeNodesByCourseId(@Valid @NotNull(message = "课程ID不可以为空") Long courseId);

    @ApiOperation("新增或修改课程计划")
    TeachplanDTO createOrModifyTeachplan(@Valid TeachplanVO vo);

    @ApiOperation("删除课程计划")
    @ApiImplicitParam(name = "teachPlanId", value = "课程计划ID", required = true, dataType = "Long", paramType = "path", example = "1")
    void removeTeachPlan(@Valid @NotNull(message = "课程计划ID不可以为空") Long teachPlanId);

    @ApiOperation("课程计划绑定媒资信息")
    TeachplanMediaDTO associateMedia(@Valid BindTeachplanMediaVO vo);
}
